-- GENERATED SPELL FOR [Smith Gorlunk] --


function spell0_22037(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13445,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22037', 15000, 1)
end

function spell1_22037(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(13444,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22037', 30255, 1)
end

function Sorts_22037(pUnit, Event)
local choix_sorts_22037 = math.random(0, 1)
if choix_sorts_22037 == 0 then
pUnit:RegisterEvent('spell0_22037', 1, 1)
end
if choix_sorts_22037 == 1 then
pUnit:RegisterEvent('spell1_22037', 1, 1)
end
end

function mob22037_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22037', math.random(1500, 3000), 1)
end

function mob22037_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22037_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22037_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22037, 1, 'mob22037_Action')
RegisterUnitEvent(22037, 2, 'mob22037_Leave')
RegisterUnitEvent(22037, 3, 'mob22037_Kill')
RegisterUnitEvent(22037, 4, 'mob22037_Die')
